<template>
  <div>
    <a @click="dispatchClick('edit')" v-if="allPermissions.devListEdit">{{ $t("devicesListSettings.devListEdit") }}</a>
    <Divider type="vertical" v-if="allPermissions.devListEdit&&allPermissions.devListDel" />
    <Dropdown
      transfer
      v-if="allPermissions.devListDel"
    >
      <a>
        {{ $t("devicesListSettings.devListMore") }}
        <Icon type="ios-arrow-down" />
      </a>
      <DropdownMenu slot="list">
        <!-- <DropdownItem @click.native="dispatchClick('open')">{{ $t("devicesListSettings.devListCut") }}</DropdownItem> -->
        <!-- <DropdownItem @click.native="dispatchClick('restart')">{{ $t("devicesListSettings.devListrestart") }}</DropdownItem> -->
        <DropdownItem @click.native="dispatchClick('del')">{{ $t("devicesListSettings.devListDel") }}</DropdownItem>
        <!-- <DropdownItem @click.native="dispatchClick('Time')">{{ $t("devicesListSettings.devListTime") }}</DropdownItem> -->
      </DropdownMenu>
    </Dropdown>
  </div>
</template>

<script>
export default {
  props: {
    row: Object,
    allPermissions: Object,
  },

  methods: {
    dispatchClick (name, props) {
      this.$emit('itemClick', name, props)
    },

    _handleBind () {
      this.dispatchClick('bindArea', this.row)
    },
  },
}
</script>
